import API from "@/api";
export default {
	attachment: {
		browser: {
			tablecode: "usercenter_space_browser",
			url: API.system.attachment.list,
			width: 800,
			height: 500,
		},
	},
	amountodd_type: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
			{ field: "customer_subject.full_name", class: "value", show: true, width: 50 },
			{ field: "supplier_subject.full_name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		url: API.finance.amountoddType.list,
	},
	barcode: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "code", class: "value", show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		browser: {
			tablecode: "basedata_barcode",
			url: API.system.barcode.list,
			width: 800,
			height: 500,
			vueDlg: [
				{
					action: "add",
					url: "basedata/barcode/save",
					callback: (ref) => {
						ref.setData([]);
					},
				},
				{
					action: "edit",
					url: "basedata/barcode/save",
					callback: (ref, params) => {
						console.log(params.button.selectRecords);
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		showfield: "name",
		url: API.system.barcode.list,
	},
	department: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		browser: {
			tablecode: "basedata_businessCompany_browser",
			url: API.system.department.list,
			width: 800,
			height: 500,
		},
		showfield: "name",
		url: API.system.department.list,
	},
	pro_dept: {
		fields: [
			{ field: "name", class: "value", show: true, width: 50 },
			{ field: "code", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		url: API.pro.dept.list,
	},
	//交易单位
	trade: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		url: API.basedata.trade.list,
	},

	process: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "code", class: "value", show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		url: API.pro.processes.cachelist,
	},
	repairreason: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		url: API.pro.repairreason.list,
	},
	departmentget: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		url: {
			get: () => {
				return {
					data: [
						{ id: "2", name: "客户" },
						{ id: "86", name: "盛泽" },
						{ id: "79", name: "濮院" },
						{ id: "81", name: "横扇" },
						{ id: "80", name: "洪合" },
						{ id: "87", name: "誉联" },
						{ id: "88", name: "秋韵" },
						{ id: "105", name: "外贸" }]
				}
			}
		},
	},
	process_route: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
			{ field: "content", class: "value", show: true, width: 400 },
		],
		showfield: "name",
		url: API.pro.ProcessRoute.cachelist,
	},
	//班次
	shift: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
			{ field: "attendance_start", show: true, width: 50 },
			{ field: "attendance_end", show: true, width: 50 },
		],
		showfield: "name",
		url: API.comprehensive.shift.list,
	},
	//岗位
	position: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
			{ field: "level", show: true, width: 50 },
		],
		showfield: "name",
		url: API.comprehensive.position.list,
	},
	//派车单
	car: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "code", key: true, show: true, width: 90 },
			{ field: "company.name", class: "value", show: true, width: 60 },
		],
		showfield: "code",
		url: API.comprehensive.car.list,
	},
	//运输
	carry: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "code", key: true, show: true, width: 90 },
			{ field: "company.name", class: "value", show: true, width: 60 },
		],
		showfield: "code",
		url: API.comprehensive.carry.list,
	},
	billtrade: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 100 },
		],
		showfield: "name",
		url: API.basedata.businessCompany.billtradeGet,
	},

	loom: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "name", class: "value", show: true, width: 100 },
		],
		showfield: "name",
		params: [{ status_id: 0 }],
		url: API.pro.scheduling.list,
	},
	device: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "name", class: "value", show: true, width: 100 },
		],
		showfield: "name",
		params: [{ status_id: 0 }],
		url: API.basedata.loom.list,
	},

	defaultLocation: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "name", class: "value", show: true, width: 70 },
		],
		showfield: "name",
		url: API.system.mpcLocaltion.defaultLocation,
	},
	financeDepartment: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
		],

		showfield: "name",
		url: API.system.financeDepartment.list,
	},
	//工艺

	//采购申请
	purchase_apply: {
		browser: {
			tablecode: "purchase_apply_browser",
			url: API.purchase.apply.list.cp(),
			width: 800,
			height: 500,
			params: [{ remain_quantity: { type: "gt", value: 0 } }],
		},
	},
	//采购订单
	purchase_order_storage: {
		browser: {
			tablecode: "purchase_order_browser",
			url: API.purchase.order.list.cp(),
			width: 800,
			height: 500,
			params: [{ remain_quantity: { type: "gt", value: 0 } }],
		},
	},

	//打印报表选择
	setting_tableconfig_report_browser: {
		browser: {
			tablecode: "setting_tableconfig_report_browser",
			url: API.system.tableReport.list.cp(),
			width: 800,
			height: 500,
		},
	},

	user: {
		fields: [
			{ field: "id", key: true, show: true, width: 30 },
			{ field: "code", show: true, width: 80 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",

		url: API.comprehensive.employee.list,
	},
	employee: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "code", show: true, width: 80 },
			{ field: "name", class: "value", show: true, width: 60 },
		],
		showfield: "name",
		url: API.comprehensive.employee.list,
	},
	color: {
		fields: [
			{ field: "code", key: true, show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
			{ field: "code_my", class: "value", show: true, width: 80 },
		],
		browser: {
			tablecode: "pro_color_browser",
			url: API.pro.color.list_all,
			width: 800,
			height: 500,
			vueDlg: [
				{
					action: "add",
					url: "basedata/businessCompany/archives/save",
				},
			],
		},
		showfield: "name",
		url: API.pro.color.list_all,
	},
	company: {
		fields: [
			{ field: "code", key: true, show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		browser: {
			tablecode: "basedata_businessCompany_browser",
			url: API.basedata.businessCompany.companylist,
			width: 800,
			height: 500,
			icon: "ElIconAvatar",
			vueDlg: [
				{
					action: "add",
					url: "basedata/businessCompany/archives/save",
				},
				{
					action: "edit",
					url: "basedata/businessCompany/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.businessCompany.companylist,
	},
	process_requirements: {
		fields: [
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",

		url: API.basedata.process_requirements.list,
	},

	customer: {
		fields: [
			{ field: "grade", show: true, width: 25 },
			{ field: "code", key: true, show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		params: [{ "category.finance_id": 1 }],
		browser: {
			tablecode: "basedata_businessCompany_browser",
			url: API.basedata.businessCompany.customerlist,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.businessCompany.category,
			categoryparams: { id: 109 },
			icon: "ElIconAvatar",
			params: [{ "category.finance_id": 1 }],
			vueDlg: [
				{
					action: "add",
					url: "basedata/businessCompany/archives/save",
				},
				{
					action: "edit",
					url: "basedata/businessCompany/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.businessCompany.customerlist,
	},
	factory: {
		fields: [
			{ field: "code", key: true, show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		params: [{ "category.finance_id": -1 }],
		browser: {
			tablecode: "basedata_businessCompany_browser",
			url: API.basedata.businessCompany.factorylist,
			width: 800,
			height: 500,

			icon: "ElIconAvatar",
			params: [{ "category.finance_id": -1 }],
			vueDlg: [
				{
					action: "add",
					url: "basedata/businessCompany/archives/save",
				},
				{
					action: "edit",
					url: "basedata/businessCompany/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.businessCompany.factorylist,
	},
	point_stick: {
		fields: [
			{ field: "id", key: true, show: false, width: 60 },
			{ field: "code", class: "value", show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 100 },
			{ field: "flower_pattern", class: "value", show: true, width: 60 },
		],
		showfield: "name",
		params: [{}], //染色
		browser: {
			tablecode: "basedata_point_stick_browser",
			url: API.basedata.PointStick.list,
			width: 800,
			height: 500,
			icon: "ElIconDataBoard",
			vueDlg: [
				{
					action: "edit",
					url: "basedata/point_stick/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
				{
					action: "add",
					url: "basedata/point_stick/save",
				},
			],
		},
		url: API.basedata.PointStick.list,
	},
	craft_bom: {
		fields: [
			{ field: "code", key: true, show: true, width: 60 },
			{ field: "name", class: "value", show: true, width: 200 },
		],
		showfield: "name",
		params: [{}], //染色
		browser: {
			tablecode: "pro_craft_bom_browser",
			url: API.pro.bom.list,
			width: 800,
			height: 500,
			icon: "ElIconDataBoard",
			vueDlg: [
				{
					action: "edit",
					url: "pro/bom/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
				{
					action: "add",
					url: "pro/bom/save",
				},
			],
		},
		url: API.pro.bom.list,
	},

	location: {
		fields: [
			{ field: "department.name", key: true, show: true, width: 100 },
			{ field: "name", class: "value", show: true, width: 100 },
		],
		showfield: "name",
		browser: {
			tablecode: "system_mpcLocaltion_browser",
			url: API.system.mpcLocaltion.list,
			width: 800,
			height: 500,
		},
		url: API.system.mpcLocaltion.list,
	},
	subject: {
		fields: [
			{ field: "code", key: true, show: true, width: 55 },
			{ field: "full_name", class: "value", show: true, width: 150 },
			{ field: "direct.name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		browser: {
			tablecode: "system_mpcLocaltion_browser",
			url: API.basedata.subject.list,
			width: 800,
			height: 500,
		},
		url: API.basedata.subject.list,
	},
	storage_browser: {
		browser: {
			tablecode: "storage_browser",
			url: API.storage.storage.browser,
			width: 1024,
			height: 500,
			params: [
				{
					available_quantity: { type: "gt", value: 0 },
					"location.is_outsourcing": 0,
					// "material.material_nature_id": 3
				},
			], //染色
		},
		url: API.storage.storage.list,
	},
	storage_wip_browser: {
		browser: {
			tablecode: "pro_storage_wip_browser",
			url: API.pro.wip.list,
			width: 1024,
			height: 500,
			params: [

			], //染色
		},
		url: API.storage.storage.list,
	},
	storage_browser_with_pd: {
		browser: {
			tablecode: "storage_browser_with_pd",
			url: API.storage.storage.browser,
			width: 1024,
			height: 500,
			params: [
				{
					available_quantity: { type: "gt", value: 0 },
					"location.is_outsourcing": 0,
					// "material.material_nature_id": 3
				},
			], //染色
			vueDlg: [
				{
					action: "pd",
					url: "storage/action/inventory/pd",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.storage.storage.list,
	},
	supplier_storage: {
		fields: [
			{ field: "code", key: true, show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		params: { category_id: { type: "in", value: [108] }, status_id: 0 },
		browser: {
			tablecode: "storage_browser",
			url: API.storage.storage.browser,
			width: 1024,
			height: 500,
			params: [
				{
					available_quantity: { type: "gt", value: 0 },
					"location.is_outsourcing": 0,
					"material.material_nature_id": 1
				},
			], //染色
		},
		url: API.basedata.businessCompany.companylist,
	},

	table_bowser: {
		browser: {
			tablecode: "setting_tableconfig_browser",
			url: API.system.role.tablelist,
			width: 1024,
			height: 500,
		},
		url: API.system.role.tablelist,
	},
	acceptance_browser: {
		browser: {
			tablecode: "finance_acceptance_rec_browser",
			url: API.finance.acceptance_rec.list,
			width: 1024,
			height: 500,
			params: [
				{ status_id: { type: "gt", value: 0 } },
				{ leftamount: { type: "gt", value: 0 } },
			], //染色
		},
	},
	storage_fl_browser: {
		browser: {
			tablecode: "storage_browser",
			url: API.storage.storage.browser,
			width: 1024,
			height: 500,
			params: [
				{
					available_quantity: { type: "gt", value: 0 },
					"location.is_outsourcing": 0,
					"material.material_nature_id": 1
				},
			], //染色
		},
		url: API.storage.storage.list,
	},
	storage_pro_browser: {
		browser: {
			tablecode: "pro_storage_browser",
			url: API.pro.wip.list,
			width: 1024,
			height: 500,
			params: [
				{
					faultle_quantity: { type: "gt", value: 0 },
				},
			],
		},
	},
	storage_browser_all: {
		browser: {
			tablecode: "storage_browser",
			url: API.storage.storage.allyarn,
			width: 1024,
			height: 500,
			params: [
				{
					available_quantity: { type: "gt", value: 0 },
					"location.is_outsourcing": 0,
					"material.material_nature_id": 3
				},
			], //染色
		},
		url: API.storage.storage.allyarn,
	},
	//装卸运输明细！
	car_carry_detail_browser: {
		browser: {
			tablecode: "car_carry_detail_browser",
			url: API.comprehensive.carCarryDetail.list,
			width: 800,
			height: 500,
			params: [
				{
				},
			], //染色
		},
		url: API.comprehensive.carCarryDetail.list,
	},

	storage_all_browser: {
		browser: {
			tablecode: "storage_browser",
			url: API.storage.storage.browser,
			width: 800,
			height: 500,
			params: [
				{
					available_quantity: { type: "gt", value: 0 },
					"location.is_outsourcing": 0,
				},
			], //染色
		},
		url: API.storage.storage.list,
	},
	opencard_browser: {
		browser: {
			tablecode: "pro_opencard_browser",
			url: API.pro.OpenCard.list,
			width: 800,
			height: 500,
			params: [
				{
				},
			], //染色
		},
	},
	outsourcing_storage_browser: {
		browser: {
			tablecode: "outsourcing_storage_browser",
			url: API.storage.storage.list,
			width: 860,
			height: 500,
			params: [
				{
					available_quantity: { type: "gt", value: 0 },
					"location.is_outsourcing": 1,
				},
			], //染色
		},
		url: API.storage.storage.list,
	},
	retail_browser: {
		browser: {
			tablecode: "retail_browser",
			url: API.market.delivery.pack,
			width: 800,
			height: 500,
			params: [
				{ "delivery.status_id": { type: "gt", value: 0 } }
			], //染色
		},
		url: API.market.delivery.pack,
	},
	materialLcategory: {
		fields: [
			// { field: "id", key: true, show: true, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		url: API.basedata.material.category.listLcategory,
	},
	material_mo: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "fullname", class: "value", show: true, width: 100 },
		],
		showfield: "fullname",
		params: { category_id: { type: "in", value: [273] }, status_id: 0 },
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			categoryparams: { id: { type: "in", value: [273] } },
			params: {
				category_id: { type: "in", value: [273], status_id: 0 }
			},
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	material_jiaoshui: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "fullname", class: "value", show: true, width: 100 },
		],
		showfield: "fullname",
		params: { category_id: { type: "in", value: [266, 267] }, status_id: 0 },
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			categoryparams: { id: { type: "in", value: [266, 267] } },
			params: {
				category_id: { type: "in", value: [266, 267], status_id: 0 }
			},
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	material_cgsample: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "spec", class: "value", show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },
			{ field: "type.name", class: "value", show: true, width: 50 },
			{ field: "pro_type.name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		params: { status_id: 0, category_id: { type: "in", value: [271] }, },
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			categoryparams: { id: { type: "in", value: [271] } },
			params: { category_id: { type: "in", value: [271] }, status_id: 0 },
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	material_cg: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "spec", class: "value", show: true, width: 50 },
			{ field: "fullname", class: "value", show: true, width: 50 },
			{ field: "type.name", class: "value", show: true, width: 50 },
			{ field: "pro_type.name", class: "value", show: true, width: 50 },
		],
		showfield: "fullname",
		params: { purchase_allow: 1, status_id: 0, material_nature_id: { type: "in", value: [1, 3] }, },
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			categoryparams: { id: { type: "in", value: [1, 195] } },
			params: { material_nature_id: { type: "in", value: [1, 3] }, status_id: 0, purchase_allow: 1, },
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	backing_category: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "name", class: "value", show: true, width: 50 },
		],
		showfield: "name",
		params: { parent_id: 195 },
		url: API.basedata.material.category.list_without_tree,
	},
	finance_material: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "name", class: "value", show: true, width: 100 },
		],
		showfield: "name",
		params: { status_id: 0 },
		url: API.basedata.financeMaterial.list,
	},
	material_cp: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "category.name", class: "value", show: true, width: 50 },
			{ field: "spec", class: "value", show: true, width: 50 },
			{ field: "name", class: "value", show: true, width: 50 },

		],
		showfield: "name",
		params: { customer_allow: 1, status_id: 0 },
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			categoryparams: { id: { type: "in", value: [195, 271] } },
			params: { status_id: 0, customer_allow: 1, },
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	material_yl: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "spec", class: "value", show: true, width: 50 },
			{ field: "fullname", class: "value", show: true, width: 50 },
			{ field: "type.name", class: "value", show: true, width: 50 },
			{ field: "pro_type.name", class: "value", show: true, width: 50 },
		],
		showfield: "fullname",
		params: {
			'category_id': {
				type: 'in', value: [195, 261, 262, 263, 264, 265, 277, 278, 279, 280, 281, 282, 283, 228, 273, 284, 285]
			}, status_id: 0
		},
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			categoryparams: { id: { type: "in", value: [273, 195, 284] } },
			params: {
				status_id: 0, 'category_id': {
					type: 'in', value: [195, 261, 262, 263, 264, 265, 277, 278, 279, 280, 281, 282, 283, 228, 273, 284, 285]
				}
			},
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	//用品
	material_yp: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "spec", class: "value", show: true, width: 100 },
			{ field: "name", class: "value", show: true, width: 100 },
		],
		showfield: "name",
		params: { material_nature_id: { type: "in", value: [2] }, status_id: 0 },
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			categoryparams: { id: { type: "in", value: [188] } },
			params: { material_nature_id: { type: "in", value: [2] }, status_id: 0 },
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	material: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "spec", class: "value", show: true, width: 50 },
			{ field: "fullname", class: "value", show: true, width: 50 },
			{ field: "type.name", class: "value", show: true, width: 50 },
			{ field: "pro_type.name", class: "value", show: true, width: 50 },
		],
		showfield: "fullname",
		browser: {
			tablecode: "basedata_material_browser",
			url: API.basedata.material.list,
			width: 800,
			height: 500,
			categoryUrl: API.basedata.material.category,
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/archives/save",
				},
				{
					action: "edit",
					url: "basedata/material/archives/save",
					callback: (ref, params) => {
						ref.setData(params.button.selectRecords[0]);
					},
				},
			],
		},
		url: API.basedata.material.list,
	},
	type: {
		fields: [{ field: "name", class: "value", show: true, width: 50 }],
		showfield: "name",
		url: API.basedata.type.list,
	},
	bom: {
		fields: [{ field: "name", class: "value", show: true, width: 700 }],
		showfield: "name",

		url: API.pro.bom.bomlist,
	},
	lot: {
		fields: [
			{ field: "id", key: true, show: false, width: 30 },
			{ field: "name", class: "value", show: true, width: 100 },
		],
		showfield: "name",
		browser: {
			tablecode: "basedata_lot_browser",
			url: API.basedata.lot.list,
			width: 800,
			height: 500,
			vueDlg: [
				{
					action: "add",
					url: "basedata/material/lot/save",
					callback: (ref, params, row, urlparams) => {
						urlparams?.map((v) => {
							row = Object.assign(row ?? {}, v);
						})
						ref.setData(params.button.selectRecords[0], row);
					},
				},
				{
					action: "edit",
					url: "basedata/material/lot/save",
					callback: (ref, params, row, urlparams) => {
						urlparams?.map((v) => {
							row = Object.assign(row ?? {}, v);
						})
						ref.setData(params.button.selectRecords[0], row);
					},
				},
			],
		},
		url: API.basedata.lot.list,
	},
};
